﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Emp1BaseInfo.aspx.cs" Inherits="Manage_Emp1_Emp1BaseInfo" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link rel="stylesheet" type="text/css" href="../skin/css/base.css" />
   <script language="javascript" type="text/javascript" src="../../Scripts/mootools.js"></script>
    <script language="javascript" type="text/javascript" src="../../Scripts/calendar.js"></script>
    <script src="../../Scripts/calendar/Popup.js" type="text/javascript"></script>
     <script type="text/javascript">

         function checkForm() {
             var control = document.getElementById("txtName");
             var code = document.getElementById("txtcode");
             var center = document.getElementById("ddlcenter");
             var cutomer = document.getElementById("ddlcustomer");
             var entrydate = document.getElementById("txtentrydate");
             var leavedate = document.getElementById("txtleavedate");
             var brand = document.getElementById("ddlbrand");
             var grade = document.getElementById("ddlgrade");
             var reg = /\d{4}-\d{1,2}-\d{1,2}/;
             if (center.value == 0) {
                 alert("请选择员工所属指挥中心！");
                 center.focus();
                 return false;
             }
             if (cutomer.value == 0) {
                 alert("请选择员工所属客户！");
                 cutomer.focus();
                 return false;
             }
             if (code.value.length == 0) {
                 alert("员工编号不能为空！");
                 code.focus();
                 return false;
             }
             if (control.value.length == 0) {
                 alert("员工名称不能为空！");
                 control.focus();
                 return false;
             }
             if (brand.value == 0) {
                 alert("请选择所属品牌！");
                 brand.focus();
                 return false;
             }
             if (grade.value == 0) {
                 alert("请选择职级！");
                 grade.focus();
                 return false;
             }
             if (entrydate.value.length == 0) {
                     alert("入职日期不能为空！");
                     return false; 
             }
             if (entrydate.value.length != 0) {
                 if (!reg.test(entrydate.value)) {
                     alert("日期格式不正确！");
                     return false;
                 }
             }
             if (leavedate.value.length != 0) {
                 if (!reg.test(leavedate.value)) {
                     alert("日期格式不正确！");
                     return false;
                 }
             }
         }
  </script>
  <style type="text/css">
.STYLE4 {
	font-size: 16px;
	color: #FF0000;
}
.STYLE5 {color: #FF0000}
.cbox{ border:none}
      .style3
      {
          width: 16%;
      }
      .style4
      {
          width: 17%;
      }
  </style>
</head>
<body>
    <form id="form1" runat="server">
  <asp:ScriptManager ID="ScriptManager1" runat="server"  EnableScriptGlobalization="True" EnableScriptLocalization="True">
        </asp:ScriptManager>
         <asp:UpdatePanel ID="up1" runat="server" >
    <ContentTemplate>
       <table width="98%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D1DDAA" align="center" style="margin-top:8px">
        <tr bgcolor="#E7E7E7">
          <td height="24" colspan="5" background="../skin/images/tbg.gif"><div align="left" >
              加盟商主管基本信息</div></td>
        </tr>
        <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22" >
          <td align="left" class="style3">所属指挥中心：<span class="STYLE5">*</span></td>
           <td align="left"><asp:DropDownList ID="ddlcenter" Width="150px" runat="server" 
                   AutoPostBack="True" onselectedindexchanged="ddlcenter_SelectedIndexChanged" ></asp:DropDownList>
                
         </td>
          <td align="left" class="style4">客户编号：<span class="STYLE5">*</span></td>
             <td align="left">
               <asp:DropDownList ID="ddlcustomer"  Width="150px" runat="server" AutoPostBack="True" 
                     onselectedindexchanged="ddlcustomer_SelectedIndexChanged"></asp:DropDownList> </td>
          <td width="20%"></td>
        </tr>
        <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22" >
          <td align="left" class="style3">客户名称：</td>
           <td align="left">
              <asp:DropDownList ID="ddlcustomername"  Width="150px" runat="server" Enabled="false"></asp:DropDownList>
            </td>
             <td align="left" class="style4">&nbsp;</td>
             <td align="left">
                 &nbsp;</td>
          <td width="20%">&nbsp;</td>
        </tr>
           <tr align="center" bgcolor="#FFFFFF" height="22"  onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';">
               <td align="left" class="style3">
                     员工号：<span class="STYLE5">*</span></td>
               <td align="left">
                  <asp:TextBox ID="txtcode" runat="server" Width="200px"></asp:TextBox>
               </td>
               <td align="left" class="style4">
                 员工名称：<span class="STYLE5">*</span></td>
               <td align="left">
                    <asp:TextBox ID="txtName" runat="server" Width="200px"></asp:TextBox>
               </td>
               <td width="20%">
               </td>
           </tr>
          <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22" >
          <td align="left" class="style3">所属于品牌：<span class="STYLE5">*</span></td>
           <td align="left">
               <asp:DropDownList ID="ddlbrand" runat="server" Width="150px">
               </asp:DropDownList>
             
            </td>
             <td align="left" class="style4">职级：<span class="STYLE5">*</span></td>
             <td align="left">
               <asp:DropDownList ID="ddlgrade" runat="server" Width="150px"></asp:DropDownList>
            </td>
          <td width="20%"></td>
        </tr>
         <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22" >
          <td align="left" class="style3">入职日期：<span class="STYLE5">*</span></td>
           <td align="left" >  
                <asp:TextBox ID="txtentrydate" runat="server" onclick="fPopUpDlg('../../Scripts/calendar/calendar.htm', txtentrydate, 'winpop', 200, 210);return false"></asp:TextBox>(格式:2008-10-10)
            </td>
           <td align="left" class="style4">离职日期：</td>
             <td align="left">
              <asp:TextBox ID="txtleavedate" runat="server" onclick="fPopUpDlg('../../Scripts/calendar/calendar.htm', txtleavedate, 'winpop', 200, 210);return false"></asp:TextBox>(格式:2008-10-10)
            </td>
          <td width="20%"></td>
        </tr>
         <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22" >
          <td align="left" class="style3">是否已完成线上讲师课程：</td>
           <td align="left" >  
               <asp:RadioButtonList ID="rbtlFinishClass" runat="server" BorderStyle="None" 
                   BorderWidth="0" CssClass="cbox" RepeatDirection="Horizontal">
                   <asp:ListItem Selected="True" Text="否" Value="0"></asp:ListItem>
                   <asp:ListItem Text="是" Value="1"></asp:ListItem>
               </asp:RadioButtonList>
            </td>
           <td align="left" class="style4">是否获得线上讲师资格：</td>
             <td align="left">
               <asp:RadioButtonList ID="rbtlIsTeacher"  runat="server" RepeatDirection="Horizontal" CssClass="cbox"  BorderStyle="None" BorderWidth="0">
                  <asp:ListItem Text="否" Value="0" Selected="True"></asp:ListItem>
                  <asp:ListItem Text="是" Value="1" ></asp:ListItem>
             </asp:RadioButtonList>
            </td>
          <td width="20%"></td>
        </tr>
         <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22" >
          <td align="left" class="style3">&nbsp;</td>
           <td align="left" colspan="4">
               
               &nbsp;</td>
        </tr>
      </table>
    
     <!--  提交 -->
      <table width='98%'  border='0' cellpadding='1' cellspacing='1' bgcolor='#CBD8AC' align="center" style="margin-top:8px">
        <tr bgcolor='#EEF4EA'>
          <td background='skin/images/wbg.gif' align='center'><table border='0' cellpadding='0' align="center" cellspacing='0'>
              <tr>
               
                <td  align="center"><asp:Button ID="btnsave" runat="server" Text="保存" 
                        OnClientClick="return checkForm();false" onclick="btnsave_Click" /></td>
               
              </tr>
            </table></td>
        </tr>
      </table>
       
       
    </ContentTemplate>
    
    </asp:UpdatePanel>
    </form>
</body>
</html>
